const axios = require('axios')
const qs = require('querystring')
const getReq=async(url, params)=>{
  try {
    const result = await axios.get(url, {
      params: params
    })
    return result.data
  } catch (e) {
    console.log(e)
  }
}
 const postReq=async function(url, body) {
  try {
    const result = await axios.post(url, qs.stringify(body))
    return result.data
  } catch (e) {
    console.log(e)
  }
}
module.exports={
  getReq,
  postReq
}
